package com.xrui.parser2;

import com.xrui.parser2.ExprSyntaxBaseVisitor;
import com.xrui.parser2.ExprSyntaxParser;
import org.antlr.v4.runtime.tree.TerminalNode;

import java.util.ArrayList;
import java.util.List;
import java.util.Random;

public class ASTEvaluator extends ExprSyntaxBaseVisitor<Object>{

    ASTEvaluator(){

    }

    @Override public Object visitExpression(ExprSyntaxParser.ExpressionContext ctx) {
        return visitChildren(ctx);
    }
    /**
     * {@inheritDoc}
     *
     * <p>The default implementation returns the result of calling
     * {@link #visitChildren} on {@code ctx}.</p>
     */
    @Override public Object visitFunctionCall(ExprSyntaxParser.FunctionCallContext ctx) {
        TerminalNode terminalNode =  ctx.GROUPBY();
        if( terminalNode != null)
        {

        }

        terminalNode = ctx.MAX() ;
        if( terminalNode != null)
        {

        }

        terminalNode = ctx.MIN();
        if( terminalNode != null)
        {

        }

        Object result = null;
        return result;
    }
    /**
     * {@inheritDoc}
     *
     * <p>The default implementation returns the result of calling
     * {@link #visitChildren} on {@code ctx}.</p>
     */
    @Override public Object visitFunctionArg(ExprSyntaxParser.FunctionArgContext ctx) { return visitChildren(ctx); }
    /**
     * {@inheritDoc}
     *
     * <p>The default implementation returns the result of calling
     * {@link #visitChildren} on {@code ctx}.</p>
     */
    @Override public Object visitFunctionArgs(ExprSyntaxParser.FunctionArgsContext ctx) { return visitChildren(ctx); }
    /**
     * {@inheritDoc}
     *
     * <p>The default implementation returns the result of calling
     * {@link #visitChildren} on {@code ctx}.</p>
     */
    @Override public Object visitField_name(ExprSyntaxParser.Field_nameContext ctx) { return visitChildren(ctx); }
}
